home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
General
/
Kamprath's CDEF Pack ƒ
/
CDEF Sampler Program ƒ
/
samplerWindow.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-21
|
1KB
|
74 lines
extern SysEnvRec gMac;
/*****
* samplerWindow.c
*
* The window routines for the Michael Kamprath's CDEF demo
*
* It is based on Symentic's TICK C 5.0 Bullseye demo.
*
*****/
#include "samplerWindow.h"
#include "samplerControls.h"
WindowPtr samplerWindow;
Rect dragRect;
Rect windowBounds = { 40, 40, 240, 265 };
Rect circleStart = {10, 10, 100, 100};
int width = 5;
/****
* SetUpWindow()
*
* Create the Bullseye window, and open it.
*
****/
void SetUpWindow(void)
{
dragRect = screenBits.bounds;
if (gMac.hasColorQD)
{
samplerWindow = NewCWindow(0L, &windowBounds, "\pCDEF Sampler",
true, noGrowDocProc, (WindowPtr) -1L, true, 0);
}
else
{
samplerWindow = NewWindow(0L, &windowBounds, "\pCDEF Sampler",
true, noGrowDocProc, (WindowPtr) -1L, true, 0);
}
SetPort(samplerWindow);
SetUpWindowCntls();
}
/* end SetUpWindow */
/*****
* DrawBullseye()
*
* Draws the bullseye.
*
*****/
void DrawSampleWindow(short active)
{
SetPort(samplerWindow);
MoveTo(5,10);
TextSize(9);
DrawString("\pKamprath's CDEF Package Sampler");
TextSize(12);
DrawControls(samplerWindow);
}
/* end DrawBullseye */